<?
	$sanpham_l=$t->get_by_thutu("sanpham_loai",-1,1);
	while($row_l=mysql_fetch_assoc($sanpham_l)){
	$idloai=$row_l['id'];
	$sanpham=$t->get_by_thutu("sanpham",-1,1," and idloai='$idloai' and ($ngaynay < thoigianden)","limit 0,5");
	if(mysql_num_rows($sanpham)>0){
?>
<script>
$(document).ready(function() {
	$('.info_sp_main').hide();
	$('.sp_index_img').mouseenter(function (){
	$(this).next().next().show();
});
	$('.info_sp_main').mouseleave(function (){
	$(this).hide();
});
});
</script>
<div class="right">
<div class="title_right">
	<h1><?=$row_l['ten_'.$lang]?></h1>
</div>
<div class="content_right" style="text-align:left;">
	<? 
	
	while($row_nb=mysql_fetch_assoc($sanpham)){?>
        <?
				$idloai=$row_nb['idloai'];
				$loai=$t->get_by_thutu("sanpham_loai",$idloai);
				$row_loai=mysql_fetch_assoc($loai);
				if($row_loai['ten_'.$lang]=='') $row_loai['ten_'.$lang]='-';
				$images=explode(":*:",$row_nb['url_img']);
		?>
    <div class="sp_index">
    	<img src="<?=$images[0]?>" width="269" height="171" class="sp_index_img" />
        <div class="title_sp_main">
        <a href="<?=$rooturl?><?=$list['3']['alias'];?>/<?=convert($row_l['ten_'.$lang])?>/<?=convert($row_so_top['ten_'.$lang])?>-<?=$row_so_top['id']?>.html">
		<?=$row_nb['ten_'.$lang]?></a>
        </div>
        <div class="info_sp_main">
        	<a class="product_hover" href="<?=$rooturl?><?=$list['3']['alias'];?>/<?=convert($row_l['ten_'.$lang])?>/<?=convert($row_so_top['ten_'.$lang])?>-<?=$row_so_top['id']?>.html">
            <div class="product_info">
			<?=$row_nb['giamgia_mota']?>
            </div>
            <?=$row_nb['giamgia_chitiet']?>
            </a>
        </div>
    </div>
    <? }?>
    <? if(mysql_num_rows($sanpham)>=5){?>
    <div class="sp_index">
    	<a href="<?=$rooturl?><?=$list['3']['alias'];?>/<?=convert($row_l['ten_'.$lang])?>-<?=$row_l['id']?>.html">
    	<img src="images/diadiemkhac.png" width="269" height="171" class="sp_index_img" />
        </a>
    </div>
    <? }?>
</div>
</div>
<? } }?>